package com.pocketsweet.chatlib.utils;

import java.io.File;
import java.io.IOException;

import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.os.Environment;
import android.util.Log;

import com.pocketsweet.MLApplication;
import com.pocketsweet.utils.PhotoUtil;
import com.squareup.picasso.Transformation;

public class PocassoSquareForRecommend implements Transformation {
	private String imageName;

	public PocassoSquareForRecommend() {
		super();
	}

	public PocassoSquareForRecommend(String name) {
		super();
		this.imageName = name;
	}

	@SuppressLint("SdCardPath")
	@Override
	public Bitmap transform(Bitmap source) {
		int size = Math.min(source.getWidth(), source.getHeight());
		Bitmap result = PhotoUtil.toRoundCorner(source,10);
		if (result != source) {
			source.recycle();
		}
		return result;
	}

	@Override
	public String key() {
		return "square()";
	}
}
